<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<link rel="stylesheet" type="text/css" href="/css/logicss/common.css" media="all">
<link rel="stylesheet" type="text/css" href="/css/logicss/print.css" media="print">
<style type="text/css" media="screen">
	@import '/css/logicss/utils.css';
	@import '/css/logicss/mix.css';
	@import '/css/logicss/small.css';
	@import '/css/logicss/e24m.css';
	@import '/css/logicss/dark.css';
	@import '/css/logicss/common.css';
	@import '/css/logicss/header.css';
</style>

<script>
function entire()
{
	var form = document.getElementById("searchMode");
	form.id.value = 0;
	form.search_key.value = "";
	form.submit();
}

function nutriment()
{
	var form = document.getElementById("searchMode");
	form.id.value = 1;
	form.search_key.value = "";
	form.submit();
}

function fortifier()
{
	var form = document.getElementById("searchMode");
	form.id.value = 2;
	form.search_key.value = "";
	form.submit();
}

function standard()
{
	var form = document.getElementById("searchMode");
	form.id.value = 3;
	form.search_key.value = "";
	form.submit();
}

function formulation()
{
	var form = document.getElementById("searchMode");
	form.id.value = 4;
	form.search_key.value = "";
	form.submit();
}

</script>

<form method="post" id="searchMode" action="/frame/search.do">
	<input type="hidden" name="id"/>
	<input type="hidden" name="search_key"/>
</form>

<div id="nav" class="content grid">	
<div id="hr"><nobr>
	<%
		String name = (String)session.getAttribute("name");
		Boolean admin = (Boolean)session.getAttribute("admin");
		if (name != null && admin != null) {
            out.print("<span><b class=hrtext>");
            if (admin.booleanValue() == true) {
                out.print("管理员，你好：" + name);
            }
            else {
                out.print("用户，你好：" + name);
            }
            out.print("</b></span>");
            out.print("<span><a href=\"/user/signOutService.do\" class=hrtext>");
            out.print(" 登出 ");
            out.print("</a></span>");
        }
        else {
            out.print("<span><a href=\"/user/register.do\" class=hrtext>");
            out.print(" 注册 ");
            out.print("</a></span>|<span><a href=\"/user/signIn.do\" class=hrtext>");
            out.print(" 登录 ");
            out.print("</a></span>");
        }
	%>
	</nobr></div>
	<div id="nav-site">
		<ul class="h-list">
			<li><a href="#" onclick="entire()">全部</a></li>
			<li><a href="#" onclick="nutriment()">营养素</a></li>
			<li><a href="#" onclick="fortifier()">强化剂</a></li>
			<li><a href="#" onclick="standard()">标准</a></li>
			<li><a href="#" onclick="formulation()">配方</a></li>
			<li><a href="/frame/returnToIndex.do">返回首页</a></li>
		</ul>
	</div><!-- end nav-site -->    
</div>